package com.luhaoran.hrm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @author haoranlu
 * @project IntelliJ IDEA
 */
@SuppressWarnings("all")
@Data
@TableName("user")  //在表名和类名不一致时可以通过这一注解指定
public class User {

    @TableId(value = "id",type = IdType.AUTO) //指定哪个属性是主键，IdType.AUTO表示该主键为自增长
    private Integer id;

    private String username;

    private String password;

    private Integer state;
}
